Optimal Transport solution in 1D
Histogram Equalisation
Application to Image contrast enhancement
Exercises
Optimal Transport solution in 1D
Histogram Equalisation
Application to Image contrast enhancement
Exercises
Consider two PDFs \(f\) and \(g\) and their CDFs noted \(F\) (with \(dF(x)=f(x)\ dx\)) and \(G\) (with \(dG(x)=g(x)\ dx\)) respectively, for random variables \(x\) an \(y\).
Problem: How to find a (bijective and differentiable) transformation \(\phi\) such that \(y=\phi(x)\) for two random variables \(x\sim f(x)\) and \(y \sim g(y)\)?
Solution: \[ \phi(x)=G^{-1}\circ F(x) \]
Example Equalization:
In this case \(g\equiv \mathcal{U}\) (uniform) then implying \(G=Id\) (identity function) and so \(G^{-1}=Id\) leading to the solution \[\phi(x)=F(x)\]
Consider the following gray level image of boats. We note this image \(I\) and its pixel intensity values \(x\).
Using all pixel values in \(I\) an histogram can be computed as an approximation of its probability density function noted \(f(x)\)
|
|
\[ f(x) \simeq \frac{Histo(x)}{\# pixels} \] Note that pixel values \(x\) have been rescaled from \([0,1]\) from \([0,255]\) in this example. |
The Cumulative Distribution Function \(F(x)=\int_{-\infty}^x f(t) \ dt\) can be computed.